package com.luozhili.thread.topic1;

/**
 * 集成thread 类 创建线程
 */
public class ThreadDemo1 extends  Thread{
    @Override
    public void run() {
        for (int i = 0; i <20 ; i++) {
            System.out.println("thread1");


            try {
                sleep(500);//睡眠500毫秒
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }
    }



}
